//
//  NoteCollect.m
//  HappyTrip
//
//  Created by dlios on 15-4-3.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "NoteCollect.h"

@implementation NoteCollect

- (instancetype)initWithDictionary:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
//        self.name = [dic objectForKey:@"name"];
//        self.first_last_day = [NSString stringWithFormat:@"%@ -- %@", [dic objectForKey:@"first_day"], [dic objectForKey:@"last_day"]];
//        self.cover = [dic objectForKey:@"cover_image"];
//        self.recommendations = [[dic objectForKey:@"recommendations"] integerValue];
//        self.view_count = [[dic objectForKey:@"view_count"] integerValue];
//        self.comment_count = [[dic objectForKey:@"comment_count"] integerValue];
//        self.idNumber = [[dic objectForKey:@"id"] integerValue];
//        NSLog(@"``````````%@", self.name);
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.idNumber = [value stringValue];
    }
    
}
- (id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}



- (void)dealloc
{
    [_name release];
    [_idNumber release];
    [super dealloc];
}



@end
